package com.lokyiu.tutorial.java.exerisce2;

public class Start {
	public static void main(String[] args){
		Vehicle benz = new Vehicle();
		benz = new Car(3,220,1200);
		Vehicle bus = new Truck(2,120,4200);
		
		Road highway = new AsphaltRoad(1200);
		Road abandon = new DirtRoad(1200);
		
		VehicleBehavior time = new VehicleBehavior(benz,highway);
		System.out.println("Benz takes " +  time.getTime() + " seconds to drive through " + highway.getLengthKm() + "Km highway");
		
		time = new VehicleBehavior(benz,abandon);
		System.out.println("Benz takes " +  time.getTime() + " seconds to drive through " + highway.getLengthKm() + "Km abandon Road");
		
		time = new VehicleBehavior(bus,highway);
		System.out.println("Bus takes " +  time.getTime() + " seconds to drive through " + highway.getLengthKm() + "Km highway");

		time = new VehicleBehavior(bus,abandon);
		System.out.println("Bus takes " +  time.getTime() + " seconds to drive through " + highway.getLengthKm() + "Km abandon Road");
	}

}
